package cn.com.taurus.impl;

import cn.com.taurus.bean.ClientAccountBankBean;
import cn.com.taurus.bean.ClientAndBank;
import cn.com.taurus.entity.Bank;
import cn.com.taurus.mapper.BankMapper;
import cn.com.taurus.service.BankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BankImpl implements BankService {
    @Autowired
    private BankMapper bankMapper;

    @Override
    public int update(Bank bank){
        return bankMapper.update(bank);
    }

    @Override
    public List<Bank> select(int caId){
        return bankMapper.select(caId);
    }

    @Override
    public int bankRegister(Bank bank) {
        return bankMapper.bankRegister(bank);
    }

    @Override
    public List<ClientAndBank> selectAllBank() {
        return bankMapper.selectAllBank();
    }

    @Override
    public int deleteBankById(Integer bId) {
        return bankMapper.deleteBankById(bId);
    }

    @Override
    public ClientAndBank selectBankById(Integer caId) {
        return bankMapper.selectBankById(caId);
    }

    @Override
    public int updateBank(ClientAndBank clientAndBank) {
        return bankMapper.updateBank(clientAndBank);
    }

    @Override
    public List<ClientAndBank> findClientAccount(String bankCode, String bankType) {
        return bankMapper.findClientAccount(bankCode,bankType);
    }
    @Override
    public int insertBank(String bankCode, String bankType, Integer bId) {
        return bankMapper.insertBank(bankCode,bankType,bId);
    }

    @Override
    public int insertBankSecond(ClientAccountBankBean clientAccountBankBean) {
        return bankMapper.insertBankSecond(clientAccountBankBean);
    }

    @Override
    public int insertClientAccountAndBank(ClientAccountBankBean clientAccountBankBean) {
        return bankMapper.insertClientAccountAndBank(clientAccountBankBean);
    }

    @Override
    public String selectBankCode(Integer bId) {
        return bankMapper.selectBankCode(bId);
    }

}
